package com.bao.work;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author baoye
 * @date 2024-07-24/17:09
 */
public class StringClass01 {
    public static void main(String[] args) {
        System.out.println("输入一个字符串");
        String str=new Scanner(System.in).next();
        System.out.println(changeStr(str));
    }
    public static String changeStr(String str){
        char [] chars=str.toCharArray();
        for(int start=0,end=chars.length-1;start<=end;start++,end--){
            char temp=chars[start];
            chars[start]=chars[end];
            chars[end]=temp;
        }
        return String.valueOf(chars);
    }
}
